import React from "react";
import { View, Input, Image } from "@tarojs/components";
import SearchIcon from '../../images/common/search_icon.png'
import './search_bar.scss'
import { useState } from "react";

const SearchBar = ({onChange,value}) => {

  const handlerInput = ({value})=>{
    onChange(value)
  }

  return (
    <View className="search-bar">
      <Image className="icon" src={SearchIcon} />
      <Input onInput={handlerInput} className="search-input" type="text" placeholder="请输入关键字" />
    </View>
  );
};

export default SearchBar;
